// 앱 실행시 첫화면 액티비티
package com.example.mytimeclock;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;

public class MainActivity extends Activity {

	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		this.overridePendingTransition(R.anim.start_enter, R.anim.start_exit);// 액티비티 전환 애니메이션
		setContentView(R.layout.activity_main);
		
		new Thread(){//1초 지연후 메인 액티비티로
			public void run() {
				try{
					sleep(1000);
				}catch (Exception e) {
				}finally {
					Intent main = new Intent(getApplicationContext(), TimerMain.class);
				    startActivity(main);
				    finish();
				}
			}
		}.start();
		
	}// end of onCreate method

	public void finish() {
		super.finish();
		this.overridePendingTransition(R.anim.end_enter, R.anim.end_exit);// 액티비티 전환 애니메이션
	}
	
	// 메뉴
	public boolean onCreateOptionsMenu(Menu menu) {
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}

}//end of MainActivity class
